# json转换parameterized格式
import json


def get_data_login(filename):
    """
    登录测试json数据处理传参
    :param filename:
    :return:
    """
    list_data = []
    with open(filename, encoding="utf-8") as f:
        dict_data = json.load(f)
        for i in dict_data:
            list_data.append(tuple(i.values()))
    return list_data


def get_emp_data(filename, inter):
    """
    员工业务场景和部门业务场景数据处理
    :param filename:
    :param inter:
    :return:
    """
    list_data = []
    with open(filename, encoding="utf-8") as f:
        jsonData = json.load(f)
        for i in jsonData:
            list_data.append(tuple(i.get(inter).values()))
    return list_data


if __name__ == '__main__':
    # print(get_data_login("./data/login.json"))
    print(get_emp_data("./data/emp_data.json","add_emp"))